package vista;

import java.awt.GridLayout;
import java.awt.Color;

import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import modelo.ladron.caracteristicas.Cabello;
import modelo.ladron.caracteristicas.Hobby;
import modelo.ladron.caracteristicas.Senia;
import modelo.ladron.caracteristicas.Sexo;
import modelo.ladron.caracteristicas.Vehiculo;


public class VistaOrdenDeArresto extends JPanel{
	
	private static final long serialVersionUID = -2243679595490984047L;
	private JComboBox<Sexo> sexo;
	private JComboBox<Cabello> cabello;
	private JComboBox<Senia> senia;
	private JComboBox<Vehiculo> vehiculo;
	private JComboBox<Hobby> hobby;
	private JButton emitir;
	private static VistaOrdenDeArresto instancia = null;
	
	private VistaOrdenDeArresto(){
		this.setLayout(new GridLayout(11,1));
		this.setBackground(Color.black);
		JLabel nombreSexo = new JLabel("Sexo:"); 
		nombreSexo.setForeground(Color.white);
		sexo = new JComboBox<Sexo>(Sexo.values());
		sexo.setSelectedItem(null);
		JLabel nombreCabello = new JLabel("Cabello:");
		nombreCabello.setForeground(Color.white);
		cabello = new JComboBox<Cabello>(Cabello.values());
		cabello.setSelectedItem(null);
		JLabel nombreSenia = new JLabel("Senia:");
		nombreSenia.setForeground(Color.white);
		senia = new JComboBox<Senia>(Senia.values());
		senia.setSelectedItem(null);
		JLabel nombreVehiculo = new JLabel("Vehiculo:");
		nombreVehiculo.setForeground(Color.white);
		vehiculo = new JComboBox<Vehiculo>(Vehiculo.values());
		vehiculo.setSelectedItem(null);
		JLabel nombreHobby = new JLabel("Hobby:");
		nombreHobby.setForeground(Color.white);
		hobby = new JComboBox<Hobby>(Hobby.values());
		hobby.setSelectedItem(null);
		emitir = new JButton("Emitir");
		
		this.add(nombreSexo);
		this.add(sexo);
		this.add(nombreCabello);
		this.add(cabello);
		this.add(nombreSenia);
		this.add(senia);
		this.add(nombreVehiculo);
		this.add(vehiculo);
		this.add(nombreHobby);
		this.add(hobby);
		this.add(emitir);
		
		VistaMenuPrincipal.obtenerInstancia().getPanelInfIzq().add(this, "vistaOrdenDeArresto");
	}
	private synchronized static void crearInstancia(){
		if (instancia == null ) {
			instancia = new VistaOrdenDeArresto();
		}
	}
	public static VistaOrdenDeArresto obtenerInstancia(){
		if (instancia == null){
			crearInstancia();
		}
		return instancia;
	}
	public static void borrarInstancia(){
		instancia = null;
	}
	public JComboBox<Sexo> getSexo(){
		return sexo;
	}
	public JComboBox<Cabello> getCabello(){
		return cabello;
	}
	public JComboBox<Hobby> getHobby(){
		return hobby;
	}
	public JComboBox<Vehiculo> getVehiculo(){
		return vehiculo;
	}
	public JComboBox<Senia> getSenia(){
		return senia;
	}
	public JButton getBotonEmitir(){
		return emitir;
	}
}
